<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#A" data-toggle="tab">{:lang('WEB_SITE_INFOS')}</a></li>
        <li><a href="#B" data-toggle="tab">{:lang('SEO_SETTING')}</a></li>
        <li><a href="#G" data-toggle="tab">CDN设置</a></li>
        <li><a href="#H" data-toggle="tab">网站信息设置</a></li>
        <li><a href="#X" data-toggle="tab">敏感词设置</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('site/sitePost')}"
          method="post">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label"><span
                                    class="form-required">*</span>{:lang('WEBSITE_NAME')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-name" name="options[site_name]"
                                       value="{$site_info.site_name|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-logo" class="col-sm-2 control-label"><span
                                    class="form-required">*</span>logo</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="hidden" name="options[site_logo]" id="thumbnail" value="{$site_info.site_logo}">
                                <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
                                    <if condition="empty($site_info.site_logo)">
                                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                             id="thumbnail-preview"
                                             width="135" style="cursor: pointer"/>
                                        <else/>
                                        <img src="{:cmf_get_image_preview_url($site_info.site_logo)}"
                                             id="thumbnail-preview"
                                             width="135" style="cursor: pointer"/>
                                    </if>
                                </a>
                                
                                <input type="button" onclick="$('#thumbnail-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail').val('');return false;" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="input-site-logo" class="col-sm-2 control-label"><span
                                    class="form-required">*</span>微信二维码</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="hidden" name="options[site_weixin]" id="thumbnail_weixin" value="{$site_info.site_weixin}">
                                <a href="javascript:uploadOneImage('图片上传','#thumbnail_weixin');">
                                    <if condition="empty($site_info.site_weixin)">
                                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                             id="thumbnail_weixin-preview"
                                             width="135" style="cursor: pointer"/>
                                        <else/>
                                        <img src="{:cmf_get_image_preview_url($site_info.site_weixin)}"
                                             id="thumbnail_weixin-preview"
                                             width="135" style="cursor: pointer"/>
                                    </if>
                                </a>
                                <input type="button" onclick="$('#thumbnail_weixin-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail_weixin').val('');return false;" class="btn btn-sm btn-cancel-thumbnail_weixin" value="取消图片">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-logo" class="col-sm-2 control-label"><span class="form-required">*</span>营业执照</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="hidden" name="options[site_zhizhao]" id="thumbnail_zhizhao" value="{$site_info.site_zhizhao|default=''}">
                                <a href="javascript:uploadOneImage('图片上传','#thumbnail_zhizhao');">
                                    <if condition="empty($site_info.site_zhizhao)">
                                        <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                             id="thumbnail_zhizhao-preview"
                                             width="135" style="cursor: pointer"/>
                                        <else/>
                                        <img src="{:cmf_get_image_preview_url($site_info.site_zhizhao)}"
                                             id="thumbnail_zhizhao-preview"
                                             width="135" style="cursor: pointer"/>
                                    </if>
                                </a>
                                <input type="button" onclick="$('#thumbnail_zhizhao-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail_zhizhao').val('');return false;" class="btn btn-sm btn-cancel-thumbnail_zhizhao" value="取消图片">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="input-admin_url_password" class="col-sm-2 control-label">
                                后台加密码
                                <a href="http://www.thinkcmf.com/faq.html?url=https://www.kancloud.cn/thinkcmf/faq/493509"
                                   title="查看帮助手册"
                                   data-toggle="tooltip"
                                   target="_blank"><i class="fa fa-question-circle"></i></a>
                            </label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-admin_url_password"
                                       name="admin_settings[admin_password]"
                                       value="{$admin_settings.admin_password|default=''}"
                                       id="js-site-admin-url-password">
                                <p class="help-block">英文字母数字，不能为纯数字</p>
                                <p class="help-block" style="color: red;">
                                    设置加密码后必须通过以下地址访问后台,请劳记此地址，为了安全，您也可以定期更换此加密码!</p>
                                <php>
                                    $root=cmf_get_root();
                                    $root=empty($root)?'':'/'.$root;
                                    $site_domain = cmf_get_domain().$root;
                                </php>
                                <p class="help-block">后台登录地址：<span id="js-site-admin-url">{$site_domain}/{$admin_settings.admin_password|default='admin'}</span>
                                </p>
                            </div>
                        </div>
                      
                        <if condition="APP_DEBUG && false">
                            <div class="form-group">
                                <label for="input-default_app" class="col-sm-2 control-label">默认应用</label>
                                <div class="col-md-6 col-sm-10">
                                    <php>
                                        $site_default_app=empty($cmf_settings['default_app'])?'demo':$cmf_settings['default_app'];
                                    </php>
                                    <select class="form-control" name="cmf_settings[default_app]"
                                            id="input-default_app">
                                        <foreach name="apps" item="vo">
                                            <php>$default_app_selected = $site_default_app == $vo ? "selected" : "";
                                            </php>
                                            <option value="{$vo}" {$default_app_selected}>{$vo}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                        </if>
                        <!--
                        <div class="form-group">
                            <label for="input-html_cache_on" class="col-sm-2 control-label">{:lang('HTML_CACHE')}</label>
                            <div class="col-md-6 col-sm-10">
                                <php>$html_cache_on_checked=empty($html_cache_on)?'':'checked';</php>
                                <div class="checkbox">
                                    <label><input type="checkbox" name="options[mobile_tpl_enabled]" value="1" id="input-html_cache_on" {$html_cache_on_checked}></label>
                                </div>
                            </div>
                        </div>
                        -->
                        <div class="form-group">
                            <label for="input-site-copyright" class="col-sm-2 control-label">版权</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-copyright" name="options[site_copyright]"
                                       value="{$site_info.site_copyright|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_icp" class="col-sm-2 control-label">{:lang('WEBSITE_ICP')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site_icp" name="options[site_icp]"
                                       value="{$site_info.site_icp|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_icp" class="col-sm-2 control-label">{:lang('WEBSITE_GWA')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site_gwa" name="options[site_gwa]"
                                       value="{$site_info.site_gwa|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_admin_email" class="col-sm-2 control-label">{:lang('WEBMASTER_EMAIL')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site_admin_email"
                                       name="options[site_admin_email]"
                                       value="{$site_info.site_admin_email|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_analytics" class="col-sm-2 control-label">{:lang('WEBSITE_STATISTICAL_CODE')}</label>
                            <div class="col-md-6 col-sm-10">
                                <textarea class="form-control" id="input-site_analytics" name="options[site_analytics]">{$site_info.site_analytics|default=''}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_shangqiao" class="col-sm-2 control-label">在线沟通</label>
                            <div class="col-md-6 col-sm-10">
                                <textarea class="form-control" id="input-site_shangqiao" name="options[site_shangqiao]">{$site_info.site_shangqiao|default=''}</textarea>
                            </div>
                        </div>
                        <!--<div class="form-group">-->
                        <!--<label for="input-site_copyright" class="col-sm-2 control-label">{:lang('WEBSITE_COPYRIGHT_INFOMATION')}</label>-->
                        <!--<div class="col-md-6 col-sm-10">-->
                        <!--<input type="text" class="form-control" id="input-site_copyright" name="options[site_copyright]" value="{$site_info.site_copyright|default=''}">-->
                        <!--</div>-->
                        <!--</div>-->
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="1">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="B">
                        <div class="form-group">
                            <label for="input-site_seo_title" class="col-sm-2 control-label">{:lang('WEBSITE_SEO_TITLE')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site_seo_title"
                                       name="options[site_seo_title]" value="{$site_info.site_seo_title|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_seo_keywords" class="col-sm-2 control-label">{:lang('WEBSITE_SEO_KEYWORDS')}</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site_seo_keywords"
                                       name="options[site_seo_keywords]"
                                       value="{$site_info.site_seo_keywords|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site_seo_description" class="col-sm-2 control-label">{:lang('WEBSITE_SEO_DESCRIPTION')}</label>
                            <div class="col-md-6 col-sm-10">
                                <textarea class="form-control" id="input-site_seo_description"
                                          name="options[site_seo_description]">{$site_info.site_seo_description|default=''}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="H">
                        <div class="form-group">
                            <label for="input-site-username" class="col-sm-2 control-label">联系人</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-username"
                                       name="options[site_username]" value="{$site_info.site_username|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-mobile" class="col-sm-2 control-label">手机</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-mobile"
                                       name="options[site_mobile]" value="{$site_info.site_mobile|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-phone" class="col-sm-2 control-label">电话</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-phone"
                                       name="options[site_phone]" value="{$site_info.site_phone|default=''}">
                            </div>
                        </div>
                         <div class="form-group">
                            <label for="input-site-email" class="col-sm-2 control-label">QQ</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-qq"
                                       name="options[site_qq]" value="{$site_info.site_qq|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-email" class="col-sm-2 control-label">邮箱</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-email"
                                       name="options[site_email]" value="{$site_info.site_email|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-fax" class="col-sm-2 control-label">传真</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-address"
                                       name="options[site_fax]" value="{$site_info.site_fax|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-address" class="col-sm-2 control-label">地址</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-site-address"
                                       name="options[site_address]" value="{$site_info.site_address|default=''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="X">
                        <div class="form-group">
                            <label for="input-site-address" class="col-sm-2 control-label">过滤敏感词</label>
                            <div class="col-md-6 col-sm-10">
                                <select name='options[site_filter]' class="form-control">
                                    <option value='1' <eq name='site_info.site_filter' value='1'>selected</eq>>开启</option>
                                    <option value='2' <eq name='site_info.site_filter' value='2'>selected</eq>>关闭</option>
                                </select>                                
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-username" class="col-sm-2 control-label">敏感词(以@分隔)</label>
                            <div class="col-md-6 col-sm-10">                                
                                <textarea class="form-control" name="options[site_mingan]" style="height: 500px;" placeholder="请填写敏感词">{$site_info.site_mingan|default=''}</textarea>                                
                            </div>
                        </div>
                      
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <div class="tab-pane" id="G">
                        <div class="form-group">
                            <label for="input-cdn_static_root" class="col-sm-2 control-label">静态资源cdn地址</label>
                            <div class="col-md-6 col-sm-10">
                                <input type="text" class="form-control" id="input-cdn_static_root"
                                       name="cdn_settings[cdn_static_root]"
                                       value="{$cdn_settings.cdn_static_root|default=''}">
                                <p class="help-block">
                                    不能以/结尾；设置这个地址后，请将ThinkCMF下的静态资源文件放在其下面；<br>
                                    ThinkCMF下的静态资源文件大致包含以下(如果你自定义后，请自行增加)：<br>
                                    themes/admin_simplebootx/public/assets<br>
                                    static<br>
                                    themes/simplebootx/public/assets<br>
                                    例如未设置cdn前：jquery的访问地址是/static/js/jquery.js, <br>
                                    设置cdn是后它的访问地址就是：静态资源cdn地址/static/js/jquery.js
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
    </form>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
